<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>我的话题</title>
    <link rel="stylesheet" href="${ctxPath}/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${ctxPath}/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${ctxPath}/css/common.css">
    <link rel="stylesheet" href="${ctxPath}/css/topic.css">
</head>
<body>
<jsp:include page="/WEB-INF/pages/commons/header.jsp"></jsp:include>

<%--面包屑导航条--%>
<nav class="list">
    <a href="${ctxPath}/index.jsp">首页</a>
    <i>/</i>
    <b>我的话题</b>
</nav>

<%--当前页面主要内容--%>
<main class="topics-container">
    <p>${message_mylist}</p>
    <div class="row title">
        <span class="col-1">序号</span>
        <span class="col-2">标题</span>
        <span class="col-3">发布时间</span>
        <span class="col-2">发布者</span>
        <span class="col-4">管理</span>
    </div>
    <c:forEach items="${topicList}" var="t" varStatus="x">
        <div class="row topic">
            <span class="col-1">${x.count}</span>
            <span class="col-2">
                <a href="${ctxPath}/topic/detail?id=${t.id}">${t.title}</a>
            </span>
            <span class="col-3">${t.publishTime}</span>
            <span class="col-2">${t.author.nickname}</span>
            <span class="col-4">
                <a href="${ctxPath}/topic/my_list/update?id=${t.id}" type="button" class="btn btn-primary btn-sm">修改</a>
                <a href="${ctxPath}/topic/my_list/remove?id=${t.id}" type="button" class="btn btn-primary btn-sm">删除</a>
                <a href="${ctxPath}/explain/delete?id=${t.id}" type="button" class="btn btn-primary btn-sm">管理评论</a>
            </span>
        </div>
    </c:forEach>
</main>

</body>
</html>